Read a data.dat file and count the number of lines where the number of 0's per line is a multiple of 3, OR the number of 1's per line is a multiple of 2: #!/usr/bin/env python3 count = 0 source = 'data.dat' with open(source) as file: content = ...
Markdown supported · ⌘↵ to post
No responses yet.