create account

linux-python by sirivellamadhu

View this thread on: hive.blogpeakd.comecency.com
· @sirivellamadhu ·
$0.81
linux-python
This blog is to give a brief code about python

the following are simple use of python command line..

python 2.7 interpreter introduction commands!
pg-48@pg48-Precision-Tower-3620:~$ python2
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "Hello python!"
Hello python!
>>> x = 4
>>> x
4
>>> y = 2
>>> y
2
>>> x+y
6
>>> x-y
2
>>> x*y
8
>>> x/y
2
>>> x%y
0
>>> x**y
16




>>> s = 'python'
>>> s
'python'
>>> s[0]
'p'
>>> s[0:2]
'py'
>>> s[2:5]
'tho'
>>> x*s
'pythonpythonpythonpython'
>>>


>>> list = [1,2.5,'python']
>>> list
[1, 2.5, 'python']
>>> list.append(x)
>>> list
[1, 2.5, 'python', 4]
>>>



>>> for i in range(10):
...     print i
...
0
1
2
3
4
5
6
7
8
9
>>>


>>> for i in range(10):
...     print i*i
...
0
1
4
9
16
25
36
49
64
81
>>>

>>> for i in list:
...     print i
...
1
2.5
python
4
>>>
👍  , , , , , , , , ,
properties (23)
authorsirivellamadhu
permlinklinux-python
categorypython
json_metadata{"tags":["python","programming","linux","data-types","sirivella-madhu"],"app":"steemit/0.1","format":"markdown"}
created2018-01-02 11:56:48
last_update2018-01-02 11:56:48
depth0
children1
last_payout2018-01-09 11:56:48
cashout_time1969-12-31 23:59:59
total_payout_value0.650 HBD
curator_payout_value0.161 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length909
author_reputation1,137,147,182
root_titlelinux-python
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id26,544,588
net_rshares67,850,889,577
author_curate_reward""
vote details (10)
@steem-network ·
<html>
<p>Congratulations <a href="/@sirivellamadhu" target="_blank">@sirivellamadhu</a>, you have decided to take the next big step with your first post! The Steem Network Team wishes you a great time among this awesome community.</p>
<hr>
<div class="pull-left"><img src="https://steemitimages.com/DQmaAdLUJ3yaSkmcmWECWyPGPWcjfbCoZ8Tu4RM6H4DbjCi/steem-network-thumbs-up.gif" alt="Thumbs up for Steem Network´s strategy" title="I suggest Steem Network´s strategy" width="320" height="222"></div>
<h1>The proven road to boost your personal success in this amazing Steem Network</h1>
<p>Do you already know that awesome content will get great profits by following these <a href="/steem-network/@steem-network/spread-your-posts-through-this-proven-strategy-and-get-great-profits-in-return--for-posts-created-at-2018-01-02" target="_blank" alt="Steem Network" title="Follow Steem Network´s suggestions to boost your success">simple steps</a>, that have been worked out by experts?</p>
</html>
properties (22)
authorsteem-network
permlinkre-linux-python-20180102t115839
categorypython
json_metadata"{"tags": ["steem-network"], "users": ["steem-network", "sirivellamadhu"], "image": ["https://steemitimages.com/DQmaAdLUJ3yaSkmcmWECWyPGPWcjfbCoZ8Tu4RM6H4DbjCi/steem-network-thumbs-up.gif"], "links": ["/@sirivellamadhu", "/steem-network/@steem-network/spread-your-posts-through-this-proven-strategy-and-get-great-profits-in-return--for-posts-created-at-2018-01-02"], "community": "steem-network", "app": "steem-network/1.0.1", "format": "html"}"
created2018-01-02 11:58:39
last_update2018-01-02 11:58:39
depth1
children0
last_payout2018-01-09 11:58:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length989
author_reputation-788,969,433,247
root_titlelinux-python
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id26,544,871
net_rshares0