why python function execution gives me nothing

ahmed daker

I'm trying some functions and when running it it gives me nothing

def formatted_city(city_name, country_name):
    formatted_name = city_name + "' " + country_name
    return formatted_name.title()


formatted_city('cairo', 'egypt')

image

expected : "Cairo' Egypt"

actual result: nothing happens

and when testing it it also gives me nothing

image

U11-Forward

You need to print it:

print(formatted_city('cairo', 'egypt'))

Output:

Cairo' Egypt

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Why it just gives me nothing?

Why python dictonary gives me Keyerror?

Why execution time in Python gives different results at each run?

Python shows me nothing

Why does puts() function gives me a heart symbol?

Why my first use of the SPARKLINE function gives me an error?

Why the first function gives me results and second one only undefined?

Why does this php array function gives me an error

Why this function return nothing?

Why does SQL querry written in python gives me an error?

Why does SQL query written in python gives me an error?

Python Dataclass gives me 'function' object has no attribute '__mro__'?

python function returns nothing

Why it gives me an extra words?

Splitting an array gives me is not a function

LISTAGG function gives me duplicates

Why XMPP function returns nothing?

GAS gives unconsistent script execution results, why?

Angular $compile outputted link-function gives me "undefined is not a function", why?

Poweshell Function Execution gives false output

Why does this Python function not release memory after execution?

Python Text parsing - Do you know why the double empty quotes appear where for me there is nothing in between?

Why [] is [] gives False in Python

Why does a function with return gives me undefined when I use it inside module export? node.js

Why does my function return NULL while the same query gives me a result?

Why does my function gives me "Stack around the variable 'url' was corrupted." error?

Why the foldr function gives me a negative result when the list contains a zero?

Why the foldr function gives me a negativ result when the list contains a zero?

I have function with another function inside. It gives me Type Error (Python)