What is the output of following?
print(abcabcab".split(‘c’, 0))"
Answers
Answered by
6
Answer :
output cannot be executed as syntax error is found "abcabcab" should've written
Explanation:
hope it helps u..
Answered by
1
In the following the syntax error will occur.The correct statement is print('abcabcab'.split('c', 0)) and this statement gives output ['abcabcab']
Explanation:
- The Split function in the python programming language returns the set of collection of character i.e string after dividing the string by the specific character.
- The syntax of the split method is given as (separator, maximum split).In the given question the separator is c and specified position is 0 as in 0 positions no c character is present in given string i.e "abcabcab".So ['abcabcab'] output is print on console.
Learn More:
https://brainly.in/question/15998302
Similar questions