id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

rmueller@lasacs.com final2021_p4 > allAboutListsPart1
prev  |  next  |  chance

Given a list with at least 3 elements that are either all integers or all strings return a list of

  1) the number of elements in the list
  2) first element of the list
  3) last element of the list

allAboutListsPart1(['a', 'b', 'c', 'd', 'e']) → [5, 'a', 'e']
allAboutListsPart1([1, 2, 3, 4, 5]) → [5, 1, 5]
allAboutListsPart1([5, 4, 3, 2, 1]) → [5, 5, 1]

...Save, Compile, Run (ctrl-enter)

def allAboutListsPart1(lst):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 100

Copyright Nick Parlante 2017 - privacy