ugik / notebooks

collection of iPython notebooks
407 stars 495 forks source link

How to allow imports? #7

Open ankitsaini-mb opened 9 months ago

ankitsaini-mb commented 9 months ago

ValueError: Generated code has disallowed imports: def solution(): """02/16/24 + 1 day""" from datetime import date, timedelta date_string = "02/16/24" date_object = datetime.strptime(date_string, "%m/%d/%y") new_date = date_object + timedelta(days=1) result = new_date.strftime("%m/%d/%y") return result