+ 1

If statements in python.....

I have just started python but I have previous experience with other programming languages such as JavaScript, C++ C# etc. first of all I wanted to ask if , If statements are normally used in python and if yes can I have help with this code? Thanks in advance!! 😄 https://code.sololearn.com/cQ3BtwXMKrZD/?ref=app

9th Jul 2018, 3:58 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
3 Respuestas
+ 3
Python recognizes blocks of code from indentation. Everything in the if block needs to be indented so if you would use tab before print it works. if x=="abc": print("def")
9th Jul 2018, 4:09 PM
davy hermans
davy hermans - avatar
+ 2
thank you davy hermans !!!😄
9th Jul 2018, 8:31 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 2
my pleasure
9th Jul 2018, 8:32 PM
davy hermans
davy hermans - avatar