मराठी

What is the output of the given Python code? st='Waterskiing is thrilling!' print(st.split("i")) - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

What is the output of the given Python code?

st='Waterskiing is thrilling!'
print(st.split("i"))

पर्याय

  • ['Watersk', 'ng ', 's thr', 'll', ‘ng!']
  • ['Watersk', '', 'ng ', 's thr', 'll', 'ng!']
  • ['Watersk', 'i', 'ng ', 's thr', 'll', ‘ng!']
  • Error

MCQ
Advertisements

उत्तर

['Watersk', '', 'ng ', 's thr', 'll', 'ng!']

Explanation:

The split("i") function divides the string wherever 'i' occurs.
Two 'i's in “skiing” create an empty string '' between them, giving.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2025-2026 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×