test_string = "This is my test STRING."
final_string = test_string[::3].lower()
print(final_string)
species_dict = {
'Rattus': 'norvegicus',
'Taeniopygia': 'guttata',
'Taeniopygia': 'castanotis',
'Drosophila': 'melanogaster',
'Macaca': 'mulatta',
'Macaca': 'nemestrina',
}
print(species_dict)
this_tuple = (
['foo', 1, 0, 'bar', 2.78, True],
{'a': 1, 'b': 2, 'c': 3},
'a simple string'
)
list(zip(*this_tuple))
initial_string = "it was the best of times, it was the worst of times"
replacement_dict = {
'a': '\u03b1',
'e': '\u03b5',
'i': '\u03b9',
'o': '\u03bf',
'u': '\u03c5'
}
output_list = []
for letter in initial_string:
if letter in replacement_dict:
output_list.append(replacement_dict[letter])
else:
output_list.append(letter)
output_string = ''.join(output_list)
print(output_string)