Changes

Jump to: navigation, search

OPS435 Python Exercise 1

576 bytes added, 06:33, 22 June 2018
selected items from a list to make useful data object
= selected items from a list to make useful data object=
== login date and logout date ==
Login date in YYYYmmmdd format:
<pre>
login_date = word_list[7]+word_list[4]+word_list[5]
print('Login date:',login_date)
</pre>
The output will be:
<pre>
Login date: 2018Feb13
</pre>
 
Logout date in YYYYmmdd format:
<pre>
logout_date = word_list[13]+word_list[10]+word_list[11]
print('Logout date:, logout_date)
</pre>
The output will be:
<pre>
Logout date: 2018Feb13
</pre>
== login time and logout time ==
<pre>
login_time = word_list[6]
print('Login time:',login_time)
</pre>
The output will be:
<pre>
Login time:
</pre>
=manipulate data objects: date, time, user name, host IP=
1,760
edits

Navigation menu