You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text="Beauty always reserved in details, don't let the big picture steal your attention!"len(text)
# 82
🧾 Number of words
text="Beauty always reserved in details, don't let the big picture steal your attention!"words=text.split(' ')
len(words)
# 13
4️⃣ Getting words have length greater than 4
text="Beauty always reserved in details, don't let the big picture steal your attention!"words=text.split(' ')
moreThan4= [wforwinwordsiflen(w) >4]
# ['Beauty', 'always', 'reserved', 'details,', "don't", 'picture', 'steal', 'attention!']
🎒 Words properties
🔠 Getting capitalized words
text="Beauty Always reserved in details, Don't let the big picture steal your attention!"words=text.split(' ')
capitalized= [wforwinwordsifw.istitle()]
# ['Beauty', 'Always']# "Don't" is not found 🙄
🔚 Getting words end with specific end
or specific start .startswith()
text="You can hide whatever you want to hide but your eyes will always expose you, eyes never lie."words=text.split(' ')
endsWithEr= [wforwinwordsifw.endswith('er')]
# ['whatever', 'never']
text="Beauty,Always,reserved,in,details,Don't,let,the,big,picture,steal,your,attention!"words=text.split(',')
joined=" ".join(words)
# Beauty Always reserved in details Don't let the big picture steal your attention!