Город МОСКОВСКИЙ
00:03:06

Write a Python Program to Accept a Filename From the User and Print the Extension of That

Аватар
Программирование От А До Я
Просмотры:
21
Дата загрузки:
02.12.2023 13:46
Длительность:
00:03:06
Категория:
Лайфстайл

Описание

Hi, In this video I tried to explain how to Write a Python Program to Accept a Filename From the User and Print the Extension of That

Code
============
filename = input("Enter the filename : ")
extension = filename.split(".")
print("File extension is : ", extension[-1] if len(extension) replace_this_with_greater_than_symbol 1 else "Unknown Extension")

Keywords
===================
how to print file extension in python,
print file extension in python,
python print file name without extension,
python file extension os,
how to print file extension in python,
python file extension validation,
python print filename without extension,
python file extension with,

Рекомендуемые видео