retrieve different values from a single string with regular expressions and python -


suggest have this:

valuestringdate = "24/6/2010" 

and want variable

day = 24 month = 6 year = 2010 

use .split() method. in case, datelist = valuestringdate.split("/") produce list: datelist = ["24","6","2010]

using indexes: day = datelist[0] set day = "24"

from there can use day = int(day) convert day string integer.

you should able figure out there.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -