Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 446

Python print first row of list

$
0
0

I'm sure there a simple solution to this question but so far it has eluded me.

I simply want to print out the first row the below list where [0] is the None value and [1] is the time stamp. Where ss is the list name.

None 2018-05-21 00:15:23.154428None 2018-05-21 00:15:25.154428None 2018-05-21 00:28:49.154627None 2018-05-21 00:30:21.154642None 2018-05-21 00:30:23.154642None 2018-05-21 00:43:17.154838None 2018-05-21 00:43:19.154838None 2018-05-21 00:45:19.154857None 2018-05-21 00:45:21.154857None 2018-05-21 00:45:23.154858None 2018-05-21 01:43:17.155843None 2018-05-21 01:43:19.155843None 2018-05-21 01:43:21.155843None 2018-05-21 02:28:17.156551None 2018-05-21 02:28:19.156552None 2018-05-21 02:28:21.156552None 2018-05-21 02:28:23.156553None 2018-05-21 02:28:25.156553None 2018-05-21 02:28:27.156553None 2018-05-21 02:30:17.156571None 2018-05-21 02:30:19.156571None 2018-05-21 02:30:21.156571None 2018-05-21 02:58:17.157040None 2018-05-21 03:13:17.157249None 2018-05-21 03:43:17.157726None 2018-05-21 03:58:21.157929None 2018-05-21 03:58:23.157930None 2018-05-21 04:00:17.158008None 2018-05-21 04:00:19.158009None 2018-05-21 04:00:21.158009None 2018-05-21 04:58:17.158840None 2018-05-21 04:58:19.158841None 2018-05-21 05:13:17.159086None 2018-05-21 05:13:19.159086

Here are several things I've attempted.

#print ss[:2]#print next(ss)#for item in ss[0:1]:#   print item#for i in ss :#   print(i[0])#print(ss(zip(*0))[0])#print ss [0:1]#for row[0] for row in ss:print row

Viewing all articles
Browse latest Browse all 446

Trending Articles