How to display only those symbols that correspond to the simple indexes starting from 1?

to read text from a file and output only those characters that correspond to the simple index starting at 1 For this to write a function that determines whether a number is Prime
Really need,that's all I could

my_file=open('z5.txt', 'w')
my_file.write('Birds are animal with feathers. Because they can fly, they are the fastest animals on Earth')
my_file.close()

my_file=open('z5.txt')
my_string=my_file.read()
print('read:')
print(my_string)
April 3rd 20 at 17:34
1 answer
April 3rd 20 at 17:36
import requests

url = 'https://oeis.org/A000040/a000040.txt'
txt = 'Birds are animal with feathers. Because they can fly, they are the fastest animals on Earth'

def is_prime(number, primes={*requests.get(url).text.split()[1::2]}):
 return str(number) in primes

for index, char in enumerate(txt, 1):
 if is_prime(index):
 print(char, end=' ')

Find more questions by tags Python