Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
Four string tools are used on a word made of one letter repeated. 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
Four string tools are used on a word made of one letter repeated.
s = "aaaa" print(s.count("aa"), s.rfind("aa"), s.find("aa", 1), "aa" * 0 == "")
What does the program print?
3 2 1 True
2 2 2 True
2 2 1 True
2 3 1 True
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A program counts the letters, digits and spaces in a line of text, and asks one more question about the whole line. What does the program print?
Three strip methods are given an argument: a string of characters to remove. What does the program print? →
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 →