Skip to main content

How to Print Date Time

import datetime

today=datetime.datetime.now()

print(today.year)
print(today.strftime("%A"))
print(datetime.datetime.now())


Comments

Popular posts from this blog

How To Install Python?

 INTRODUCTION Before we talk about to install Python and which Python distribution to install, it is important to discuss whether to use Python 2.x or Python 3.x.  Python 2.x. vs. Python 3.x. Python 2.x. is a legacy version which was last released in 2010 (version 2.7.x.) and discontinued after that, but the support for this version remained for the sake of backward compatibility. Python 3.x. is considered the present and future edition of the language. Python 3.x. is a preferred version to use because of these :-  The overwhelming majority of third-party Python Library support Python 3.x. Python 3.x. has many features and performances benefits that aren't available in Python 2.x. Also, the differences in syntax between the two versions are fairly minimal. It won't take long to learn Python 2.x if ever you need to. Python Distributions Python is an interpretered language and you need Python interpreter to execute Python programs. As Python is becoming preferred choice for...

How To make a Calculater

                    INTRODUCTION             Python is very useful and very easy  and simple to use programming language other than  C++,C#,C language,Java etc. In Python you can easily make many things are like game development, etc.                   There are many ways to make a calculator in Python but I will give you a simple and easy to make a calculator in Python.                       There are some Steps to Make A calculator in Python .                         So, Let's Begin.              STEP1:- USE INPUT() METHOD TO ADD TWO NUMBERS.                     In Python. You should use input() method to enter any number or a...

What is Python?

 There are many languages are like C++,C Languages, Java,Java scripts,C# etc. in computer that understand but Python is latest and very simple to Use.   The word Python -- isn't it scary? Does it bring the image of big reptile that we prefer to see either in jungle or zoo?                 What Is Python?   Python is an easy to learn and powerful object oriented programming language. It is a very high level programming language yet as powerful as many other middle level not so high-level language like C,C++,Java etc.  Introduction of  Python P ython the programming language. Was Named after  MONTY PYTHON FLYING CIRCUS. Python was influenced by Two Programming Languages:- ABC LANGUAGE MODULA-3 Python was invented by "Guido Van Rossum " & Invented in 1990               Advantage  of Python Easy to use( Python is compact and very easy to use object oriented language with ve...