Python Forum
Print the number of items in a list on ubuntu terminal
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print the number of items in a list on ubuntu terminal
#1
Hey all.
In return of a command, I have the following output on my ubuntu terminal.
Output:
tshark: Display filters were specified both with "-Y" and with additional command-line arguments. 21 List of ARFCNs = 62 53 List of ARFCNs = 62 60 58 57 55 54 53 52 51 50 49 25
I want a python code that prints the number of entries in the first list i.e. 2.
Please help.
Reply
#2
what have you tried so far?
Please show code working or not
Reply
#3
Why Python? Why not just a shell pipeline with say, AWK (other tools are probably also suitable)? Is your goal to learn Python?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Feed List items with Integer euras 9 393 May-19-2021, 07:45 PM
Last Post: snippsat
  Parse String between 2 Delimiters and add as single list items lastyle 5 419 Apr-11-2021, 11:03 PM
Last Post: lastyle
  Sum of list items tristanfermat 2 439 Feb-06-2021, 12:04 PM
Last Post: tristanfermat
  print two different sequence number mantonegro 2 365 Nov-16-2020, 06:19 PM
Last Post: mantonegro
  Count number of occurrences of list items in list of tuples t4keheart 1 465 Nov-03-2020, 05:37 AM
Last Post: deanhystad
  How do I add a number to every item in a list? john316 2 363 Oct-28-2020, 05:29 PM
Last Post: deanhystad
  concatenating 2 items at a time in a python list K11 3 498 Oct-21-2020, 09:34 AM
Last Post: buran
  Print max numbers in a list jimmoriarty 1 460 Sep-25-2020, 07:29 AM
Last Post: DPaul
  Select the other of 2 items in a list Clunk_Head 7 908 Sep-01-2020, 05:27 PM
Last Post: Clunk_Head
  Print variable values from a list of variables xnightwingx 3 627 Sep-01-2020, 02:56 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020