extract particular strings into a variable - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: extract particular strings into a variable (/thread-31404.html) |
extract particular strings into a variable - lokesh - Dec-09-2020 Hi, I have a requirement to get the string data like below. str = "dsrc, combo, dsrc_hist, mapping, combo_hist" If a particular value contains "hist" needs to assign to one variable and if not "hist" send him to another variable. var1 = "dsrc_hist, combo_hist" var2 = "dsrc, combo, mapping" Can you please help me to achieve the above functionality? Thx in advance RE: extract particular strings into a variable - Larz60+ - Dec-09-2020 Please show what you have tried so far, any errors, and specific location where you need help. RE: extract particular strings into a variable - Sofia_Grace - Dec-09-2020 Hello, Hope you are well. I can assist you with the requirement. Can we have a detailed discussion regarding the same? I can be reached at mail/skype:- [email protected] Hoping to listen from you soon. BR, Sofia RE: extract particular strings into a variable - lokesh - Dec-09-2020 Thanks.. I resolved it my own Thx, Lokesh |