Skip to content

Commit bd685b3

Browse files
authored
Add files via upload
Prints the extension of the file name
1 parent d33999b commit bd685b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

print_extension.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
file_name = input('Enter the file name with extension followed by a dot: ')
2+
extension_name = file_name.split('.')
3+
print(f'the ext is: {repr(extension_name[-1])}')
4+

0 commit comments

Comments
 (0)