kode2go / python

Lessons on learning python programming.
0 stars 0 forks source link

Python Exercises: Q7 #7

Open kode2go opened 3 years ago

kode2go commented 3 years ago
  1. Write a Python program to accept a filename from the user and print the extension of that. Sample filename = "abc.java456" Output :
    java
kode2go commented 3 years ago
fileName = "abc.java"
print(fileName[4:])
fileName = "abc.java456"
print(fileName[4:8])