filmov
tv
132. String Upper and Swapcase Method in Python with Example Code || Python String Methods-14

Показать описание
Code:
string='this should be uppercase!'
string='Th!s Should B3 UPp3rCas3!'
firstString='python is awesome!'
secondString='PyTHon Is aWEsoME!'
print("Strings are same.")
else:
print("Strings are not same.")
#swapcase
string='THIS SHOULD BE LOWERCASE!'
string='this should be uppercase!'
string='ThiS ShouLD Be MiXeD cASed.'
string='this should be uppercase!'
string='Th!s Should B3 UPp3rCas3!'
firstString='python is awesome!'
secondString='PyTHon Is aWEsoME!'
print("Strings are same.")
else:
print("Strings are not same.")
#swapcase
string='THIS SHOULD BE LOWERCASE!'
string='this should be uppercase!'
string='ThiS ShouLD Be MiXeD cASed.'