Oct-30-2018, 01:26 AM
The if statement I tried was:
If len(mystr) < 6
print(‘<mystr> is not a valid str’)
else:
print(‘<mystr> is valid’)
Based on the program I need to write, I understand the else statement should not be written there yet however, I just wanted to test if these if and else statements work. I am getting a “Syntax” error next to the “...< 6” line.
If len(mystr) < 6
print(‘<mystr> is not a valid str’)
else:
print(‘<mystr> is valid’)
Based on the program I need to write, I understand the else statement should not be written there yet however, I just wanted to test if these if and else statements work. I am getting a “Syntax” error next to the “...< 6” line.