Post

Python Programming
Python Programming@PythonPr·
What is The Difference ❓ Comment The Answer 📷🔥
Python Programming tweet media
English
22
4
51
10.1K
Ranjeet Munjewar
Ranjeet Munjewar@MunjewarRanjeet·
@PythonPr Python is the only place where 'x' and 'X' are more different than my ex and me." 🐍💀
English
0
0
1
30
Gg Galvez
Gg Galvez@GgViewer77·
@PythonPr The ✓ version should work because the variable 'x' is consistent. The × version will fail at the end because its attempt to print(X) changes to uppercase, not the same as it's prior use in lower case.
English
0
0
1
41
Ranjan
Ranjan@Ranjanrgdev·
@PythonPr X is capital in second one. @grok am i correct ?
English
1
0
1
475
VIPER3398
VIPER3398@VIPER3398·
@PythonPr You are asking to print the value of X which does not exist in the code.
English
0
0
0
63
Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@PythonPr Top: prints [1, 2, 3, 4] — y = x means both names point to the same list, so append() mutates it in place. Bottom- NameError (X is not defined). Python is case-sensitive.
English
0
0
0
15
CasBlog
CasBlog@CasBlog58512·
@PythonPr Print(X) is supposed be print(x) with x in small letter in the second case
English
0
0
0
383
Animal A Day
Animal A Day@animaladay001·
@PythonPr Use of wrong cases. Upper case is used to print when the variable x is on a lower case.
English
0
0
0
40
Sunil
Sunil@SunilSun56557·
@PythonPr print(x) works because Python is case-sensitive. X is a different variable.
English
0
0
0
455
𝓘𝓷𝓻𝓸𝓽
𝓘𝓷𝓻𝓸𝓽@_inrot·
@PythonPr La variable passée en argument de la fonction print du second cas est en majuscule. Python est sensible à la casse.
Français
0
0
0
213
Jsime
Jsime@jc_jsime·
@PythonPr You are printing upcase X when it should not be
English
0
0
0
11
Jak Darmes
Jak Darmes@DarmesJak·
@PythonPr print(x) is correct because the “x” within parentheses is supposed to be lower case
English
0
0
0
43
Paylaş