Aug-27-2019, 06:36 AM
Can I create alias variables for parts of another variable ? For example, I have variables as below.
full_date = '20190827'
yyyy = full_date[0:4] ### Want this as mutable
mm = full_date[4:6] ### Want this as mutable
dd = full_date[6:8] ### Want this as mutable
# Now, if I do
mm -= 1
# I expect full_date = 20190727
# I do not want to use full_date[x:y] every time
Is the above possible ?
Thanks in advance for the help!
full_date = '20190827'
yyyy = full_date[0:4] ### Want this as mutable
mm = full_date[4:6] ### Want this as mutable
dd = full_date[6:8] ### Want this as mutable
# Now, if I do
mm -= 1
# I expect full_date = 20190727
# I do not want to use full_date[x:y] every time
Is the above possible ?
Thanks in advance for the help!