Ad

Thursday, December 7, 2017

String Manipulation in Python - Technical Interview with Python for Bootcamp Graduates

What would happen if you try to split an empty string? '' Will it throw an error?

''.split()

Answer:

-----
No. It will return an empty Python list array.
-----

What would happen if you try to join an empty array? [] Will it throw an error?

''.join([])

Answer:

-----
No. It will return an empty string ''.
-----


No comments:

Post a Comment

React UI, UI UX, Reactstrap React Bootstrap

React UI MATERIAL  Install yarn add @material-ui/icons Reactstrap FORMS. Controlled Forms. Uncontrolled Forms.  Columns, grid