Python Arrow Module: Create a new Arrow object, cloned from the current one
Write a Python program to create a new Arrow object, cloned from the current one.
Sample Solution:
Python Code:
import arrow
a = arrow.utcnow()
print("Current datetime:")
print(a)
cloned = a.clone()
print("\nCloned datetime:")
print(cloned)
Sample Output:
Current datetime: 2019-06-01T10:50:46.486000+00:00 Cloned datetime: 2019-06-01T10:50:46.486000+00:00
Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a Python program to create a string representation of the Arrow object, formatted according to a format string.
Next: Write a Python program to create a datetime object, converted to the specified timezone using arrow module.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics