0
How to assign input value to something in python?
2 ответов
+ 3
x = input()
0
you use a variable name, which have a rule:
You can only use CAPITAL letters and small letters, you can use underscores and numbers, but variable name can't start with a number.
To assign the Variable name to a value you use Variable name following with = (1 equal to) and after = you put a value you want to assign the variable to,
input() is a function, which returns text (string) written by user.
In example you assign value returned by the input() function to the L0OOo0nG_Varjable_NAME.
L0OOo0nG_Varjable_NAME = input()
You CAN'T write it:
input() = L0OOo0nG_Varjable_NAME
it causes error, because you are trying to assign a variable to a value.