Advertisement
sigmachto

Untitled

Jul 15th, 2023
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #6)
  2. def sixth(name):
  3.     with open(name,'r') as f:
  4.         a = f.read().split('\n')
  5.     return ' '.join(a)
  6. #8)
  7. def delete_trash(n):
  8.     a = n.rstrip('!?.')
  9.     return a
  10.  
  11. #14)
  12. def d(name):
  13.     d1 = {}
  14.     with open(name,'r') as f:
  15.         n = f.readlines()
  16.     for line in n:
  17.         word = line.split()
  18.         if word[2].isdigit():
  19.             d1[word[0]] = (word[1],word[2])
  20.     return d1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement