+ 5

Python

J = 'true' if J != 'true' 'smaller' 'bigger': print(4) Guys first i saw this i thought this would produce an error but it worked... How.. How is it calculated... I mean there is no ',' between them so hoe is it executed... And its always true.... Even if u change J value... Im not a beginner but this is new to me

24th Jul 2019, 4:33 PM
Amirabbas
Amirabbas - avatar
6 odpowiedzi
+ 8
You can line up several strings like this and they automatically meld into one. That's convenient when you want to format your code: print( 'This is line one, but actually ' 'this is still line one.' ) More details: https://code.sololearn.com/c9a0cG9dpVUr/?ref=app
24th Jul 2019, 4:50 PM
HonFu
HonFu - avatar
+ 3
Thanks alot... It was really hard to search this on Google (tough my English is not that much good too).. Thanks again❤️
24th Jul 2019, 4:54 PM
Amirabbas
Amirabbas - avatar
0
Exactly
25th Jul 2019, 12:46 PM
Amirabbas
Amirabbas - avatar
0
/--4
27th Jul 2019, 4:11 AM
dsh
0
skkso
27th Jul 2019, 4:12 AM
dsh
- 5
If py < java: Print ("true") Else: Print ("u r noob")
25th Jul 2019, 3:06 PM
Siddesh