repl.it
@ArjunSS1/

Computer Programming project

Python

No description

fork
loading
Files
  • main.py
  • Input file.dat
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
f = open("Input file.dat", 'r')

lines = int(f.readline())
while(lines > 0):
  inputval, result = f.readline(), ""
  attempt = 0
  for char in inputval:
    if attempt % 2 == 0:
      result = result + char
    attempt = attempt + 1
  print((result).strip())
  lines = lines - 1
f.close()
?