Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

difference between __str__ and __repr__

>>> import datetime
>>> now = datetime.datetime.now()
>>> now.__str__()
'2020-12-27 22:28:00.324317'
>>> now.__repr__()
'datetime.datetime(2020, 12, 27, 22, 28, 0, 324317)'
Comment

PREVIOUS NEXT
Code Example
Python :: dataframe to text file 
Python :: # How to Prints the current working directory in python 
Python :: remove first 3 columns pandas 
Python :: simple way of finding file extension python programming 
Python :: loss funfction suited for softmax 
Python :: how to use pafy 
Python :: networkx max degree node 
Python :: flask port 
Python :: django orm sum 
Python :: clone website in python 
Python :: pandas group by day 
Python :: python soap 
Python :: comment out a block in python 
Python :: python convert date to timestamp 
Python :: change strings in a list to uppercase 
Python :: python how to remove commas from string 
Python :: string to bits python 
Python :: socket io python 
Python :: request headers in django 
Python :: how to check if a list is nested or not 
Python :: use loc for change values pandas 
Python :: Python Program to Find Armstrong Number in an Interval 
Python :: basic games to code in python 
Python :: python functions 
Python :: get dataframe column names 
Python :: checkbutton tkinter example 
Python :: whatsapp online tracker python script 
Python :: Find the title of a page in python 
Python :: levenshtein distance 
Python :: importing database in dataframe using sqlalchemy 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =