I want to write a function that takes a file and a character and returns the number of character, the character is space for example.I wrote the code below but it doesn't work.
Code:
def c (file, char):
f = open ('file1.txt', 'r')
s = f.read()
i = 0
for char in s:
i += 1
Comment