Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pathlib import Path
- for p in Path('.').glob('*.txt'):
- if not p.is_file():
- next
- with p.with_suffix('.sh').open(mode='w') as w:
- print(p.stem, file=w)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement