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

 

rmueller@lasacs.com final2021_p4 > allAboutListsPart3
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
  4) a string of the 2nd and 2nd to last elements of the sorted list.
  5) a string of the elements of the sorted reversed list.

allAboutListsPart3(['a', 'b', 'c', 'd', 'e']) → [5, 'a', 'e', 'bd', 'edcba']
allAboutListsPart3([1, 2, 3, 4, 5]) → [5, 1, 5, '24', '54321']
allAboutListsPart3([5, 4, 3, 2, 1]) → [5, 5, 1, '24', '54321']

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

def allAboutListsPart3(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