For some reason I get "none" when I ask for input from the user, it doesn't matter if it's in a function.
age = input(print("whats your age: "))
print(f"Your age is {age}")
output: whats your age: None50 Your age is 50
For some reason I get "none" when I ask for input from the user, it doesn't matter if it's in a function.
age = input(print("whats your age: "))
print(f"Your age is {age}")
output: whats your age: None50 Your age is 50
input
already prints its param.
print
returns None
. that's why input prints None
.
try this:
age = input("whats your age: ")
print(f"Your age is {age}")