+ 1

how to find out if two strings are equal without using an if statement? In python ??

26th Dec 2019, 5:25 PM
rahab
8 Respostas
+ 1
Yes, WhyFry was faster my_string1 = 'abcd' my_string2 = 'abcd' my_string3 = 'abc' print(my_string1 == my_string2) print(my_string1 == my_string3) # Output will be: True False
26th Dec 2019, 5:48 PM
Coding Cat
Coding Cat - avatar
+ 3
Thanks for your help
26th Dec 2019, 6:55 PM
rahab
+ 1
Mirielle🐶 Thanks rahab Looks like WhyFry and Thomas have given you some good answers.
26th Dec 2019, 6:42 PM
Rik Wittkopp
Rik Wittkopp - avatar
0
This is the first time I have used the program so I have no idea how to use it😅😅😅
26th Dec 2019, 5:39 PM
rahab
0
WhyFry , no. I don't have done any thing with Django until now. I have only the idea to have a look at this some times in the future.
26th Dec 2019, 6:43 PM
Coding Cat
Coding Cat - avatar