This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
verse="""Up above the world so high | |
Like a diamond in the sky""" | |
print(verse.replace('world','hill').replace('diamond','butterfly')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
poem="""twinkle, twinkle, little car | |
How I wonder what you are | |
Up above the world so high | |
Like a diamond in the sky | |
twinkle, twinkle little car | |
""" | |
print(poem.replace('twinkle','shimmer',2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
poem="""twinkle, twinkle, little star | |
How I wonder what you are | |
Up above the world so high | |
Like a diamond in the sky | |
twinkle, twinkle little star | |
""" | |
print(poem.replace('star','car')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HideAndSeek='BCAbC' | |
G=HideAndSeek.find('G') | |
if G==-1: | |
print('NO') | |
else: | |
print('YES') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HideAndSeek='BCAbC' | |
print(HideAndSeek.find('b')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HideAndSeek='BCA C' | |
print(HideAndSeek.find('C',2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HideAndSeek='B AC' | |
HideAndSeek.find('A') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
students={'Eddy','Mira','John','Sia'} | |
print(students[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
courses={'python','c','java'} | |
print(courses) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unika={1,3,7,2,1,7} |
NewerOlder