Challenge Yourself To Print Out The Length Of A String In Python
Not using ChatGpt makes you smarter; I'm all for saving time with A.I. but not for compromising my growth as a newbie developer. Look at every coding challenge as a way to grow as a software developer.
Practicing for a very long period is what makes you improve. My code from yesterday failed, but I returned the next day and remembered how to complete the code challenge off the top of my head.
Practicing for a very long period is what makes you improve. My code from yesterday failed, but I returned the next day and remembered how to complete the code challenge off the top of my head.
''' print out the length of a string'''
string = "MyString"
for letters in string:
print(len(letters))
sum = len(string)
print(sum)
Output :
1
1
1
1
1
1
1
1
8
Comments
Post a Comment