Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
A program finds the dots in a file name. What does the program print?
Python Programming
Hard
High School (11–12)
Python Basics › Strings
Class 12 Board
PCAP (Python Institute)
+3 more exams
AP
A-Level
IB
AP
A-Level
IB
PCAP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A program finds the dots in a file name.
path = "data.backup.tar.gz" first = path.find(".") last = path.rfind(".") print(first, last, path[last + 1:], path[:first].upper())
What does the program print?
4 15 .gz DATA
4 15 gz DATA.
4 15 gz DATA
4 3 gz DATA
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A class keeps a code with its spaces removed, and a method picks out its digits. What does the program print?
A class has a __str__ method, and a program joins its objects into one line. What happens when the program runs? →
More on
Python Basics › Strings
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
For the text "the cat sat on the mat", write the program lines that show: how many times at occurs…
Medium
A student wants to change the name "Rahul" to "Raju" and writes…
Medium
The variable word = "elephant" has eight letters…
Easy
The name is "asha rao". Show its initials in capital letters: AR.
Hard
All problems on this topic →