How to split string in characters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vladeta
    New Member
    • Oct 2022
    • 1

    How to split string in characters

    How to split 123.4 in '1','2','3','.' ,'4'
  • dev7060
    Recognized Expert Contributor
    • Mar 2017
    • 655

    #2
    How to split 123.4 in '1','2','3','.' ,'4'
    What have you done so far?

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      Good Morning Vladeta and welcome
      What dev7060 is trying to say is that Bytes.com isn't a coding nor homework service, instead, the culture here is to help you to help yourself.
      We'll proofread, we'll give pointers; however, complete solutions - not normally unless the solution is a really simple one-liner type.

      So, with that in mind
      We need two things from you:
      • What coding environment are you working in - we cannot tell because you've posted in the general forum instead of taking the time to find the correct topic forum
      • Please post your script - click on that [CODE/] button in the reply-box-ribbon and then post the script between the [CODE][/CODE] tags

      Best of luck with your project
      Last edited by zmbd; Oct 22 '22, 01:15 AM.

      Comment

      • jameswalter
        New Member
        • Oct 2022
        • 4

        #4
        def split(word):
        return list(word)

        # Driver code
        word = 'geeks'
        print(split(wor d))



        Check with this.

        Comment

        Working...