Hello people, is it ok to always use the indentation with 5 spaces below "if", "else" or "elif"?

myexample = 'cantina' if myexample == 'cantinas': print("Same to cantinas") elif myexample == 'barras': print("Same to barras") elif myexample == 'cantina': print("Same to cantina") else: print("Let/'s go to other place")

7/30/2019 8:36:30 PM

Whally O

2 Answers

New Answer


Whally O 4 space is recommended but you can use any number of space, just be consistent through out the code. The only thing is that with different number of space in your code than recommended, if you open them in different editors, some may give you warning about number of spaces.


Thank you ~ swim ~ , I'll keep that on mind.