我第一次使用Python中的日历函数,这是我的代码:
import calendar
print ("The calender of year 2018 is : ")
print (calendar.calendar(2018,2,1,6))
print ("The starting day number in calendar is : ",end="")
print (calendar.firstweekday())
我得到了以下输出。
The calender of year 2018 is :
Traceback (most recent call last):
File "C:/Users/AAKASH PATEL/Desktop/calendar.py", line 5, in <module>
import calendar
File "C:/Users/AAKASH PATEL/Desktop\calendar.py", line 10, in <module>
print (calendar.calendar(2018,2,1,6))
TypeError: 'module' object is not callable
我该如何解决这个问题?