python - print a list and group it by a certain mapping -


Hi what I'm trying to do is

say that there An order list is the word

  list = ["ACC", "Ashley", "Book", "Channel", "Charlie", "David", "Eli," George "Zebra" "]   

How can I print it

  1. If there is one variable then it will be printed without brackets or quatations
  2. If there is more then for an example, it is a bracket based on a dictionary Will be grouped with

    hence starting with 1 mapped letters All words will be classified into brackets and further

    Therefore, the desired output of the above list is just

      [one, Ashley, book, channel, Charlie] [David, Eli] George Zebra    

    should do some work with these lines

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -