Are Python variables a string that is 0 if you don’t define them? [closed]

  python

I am relatively new to python and I just have a question about variables. My question is if I don’t define my variable example the variable inp does it mean that by default the variable is a string that is 0? I am asking this because I have a basic program that converts European floors to USA floors and despite not defining the variable it converts the string 0 to an integer 0.

inp = input('Europe floor ?') 
usf = int(inp)+ 1
print('US floor' , usf)

Source: Python Questions

LEAVE A COMMENT