Python basics data types
Title: Python Basics: Data Types
Date: 2017-10-26 13:26
Modified: 2017-10-30 13:26
Category: Python
Tags: python, basics
Slug: python-basics-data-types
Authors: Max
Summary: Integers, floats, and strings.
Integer¶
print 2, type(2)
print 2/6, type(2/6)
print 2%6, type(2%6)
Float¶
print 2., type(2.)
print 2.6, type(2.6)
print 2./6, type(2./6)
print 2/6., type(2/6.)
print 2.%6, type(2.%6)
print 2%6., type(2%6.)
String¶
print 'green tea', type('green tea')
print "green tea", type("green tea")
print '123', type('123')