I want to read a line from a file and make operation on specific char on that line. I read line as in link on stackoverflow
But there is a problem for me because I want to reach every single char in that file. My code is:
with open(r'C:\Users\BerkayS\Desktop\testfile.txt') as inputFile:
content = inputFile.read().splitlines()
kelime = content[0:1]
here kelime is a list as expected. But it is a line in file actually, so I want to reach every char in that line, when I write
harf = kelime[2:5]
it returns empty because kelime's length is 1 as a whole string. How can I split all chars and spaces in kelime into a new list that I can manupulate all of them?