Splitting, Concatenating, and Joining Strings in Python

Quiz
•
Computers
•
University
•
Hard
Sangameshwar Biradar
Used 20+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
In Python, strings are…
char arrays
changeable
immutable
str objects
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
The minsplit parameter to split() specifies the minimum number of splits to make to the input string.
False
True
3.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
Which of the following would separate a string input_string on the first 2 occurences of the letter “e”?
'e'.split(input_string, maxsplit=2)
input_string.split('e', 2)
input_string.split('e', maxsplit=2)
'e'.split(input_string, 2)
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Python strings have a property called “immutability.” What does this mean?
Strings can’t be divided by numbers
You can update a string in Python with concatenation
Strings in Python can be represented as arrays of char S
Strings in Python can’t be changed
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
If you want to transform a list of strings input_list into a single string with a comma between each item, which of the following would you give as the input to join()?
string
' , '
str
input_list
6.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
Which of the following mathematical operators can be used to concatenate strings:
*
/
-
+
Similar Resources on Wayground
10 questions
ภาษาไพธอน

Quiz
•
University
10 questions
Workshop 2 Review

Quiz
•
University
10 questions
Python Basics

Quiz
•
University
10 questions
Q8 - FundComp - Python Básico (En)

Quiz
•
University
10 questions
DFA - Design 2

Quiz
•
University
10 questions
PSP Week3

Quiz
•
University
10 questions
Exploring Python: Input and Output Essentials

Quiz
•
9th Grade - University
10 questions
PYTHON_CHAPTER 6

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade