[Tutor] Extract Names from string

Joel Goldstick joel.goldstick at gmail.com
Tue Aug 3 09:31:25 EDT 2021


On Tue, Aug 3, 2021 at 9:09 AM Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
>
> I have a project which generates a large number of data files and have
> pyhon scrip;t that does most of the pre- and post-processing. However, I
> have one problem which has not succumbed to Googling.
>
> I have a list of chemical names which I can load as a string of the form:
>
> "name1","name2", . . .
>
> Unfortunately, the names are not the same length which precludes
> extracting each name by indexing.
>
> My question is ho w to extract individual names?
>

you need the csv module: https://docs.python.org/3/library/csv.html
> Thanks in advance.
>
> --
> Stephen P. Molnar, Ph.D.
> 614.312.7528 (c)
> Skype: smolnar1
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor



-- 
Joel Goldstick


More information about the Tutor mailing list