Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6007737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:43:27+00:00 2026-05-23T01:43:27+00:00

I have a nested list that I am using in Robot Framework. I would

  • 0

I have a nested list that I am using in Robot Framework. I would like to change one item in a sublist at the Robot Framework level.

My list looks like this:

[ bob, mary, [june, july, august]]

I want to change “july” to something else, say “september”

Robot Framework will let me change ‘bob’ or ‘mary’, but if I try to insert a list, it is converted into strings.

(Oh, I have tried to use the “Insert Into List keyword to insert a new sub list, and other List keywords, no luck with any.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:43:27+00:00Added an answer on May 23, 2026 at 1:43 am

    I am guessing from the lack of response that there isn’t a neat clean solution to this. Here is what I have done:

    I created a utility thusly:

    class Pybot_Utilities:
        def sublistReplace(self, processList, item, SublistIndex, ItemIndex):
            '''
            Replaces an item in a sublist
            Takes a list, an object, an index to the sublist, and an index to a location in the sublist inserts the object into a sublist of the list at the location specified. 
            So if the list STUFF is (X, Y, (A,B,C)) and you want to change B to FOO give these parameters: [STUFF, FOO, 2, 1]
            '''
    
            SublistIndex=int(SublistIndex)
            ItemIndex=int(ItemIndex)
            processList[SublistIndex][ItemIndex] = str(item)
            return processList
    

    I then put this entry in my robot framework test suite file:

    |    | ${ListWithSublist} = | sublistReplace    | ${ListWithSublist]}  | NewItem | 1 | 1 |
    

    (Importing my utility library, of course)

    After this runs, the second item (index 1) in the sublist at index 1 of the list will be “NewItem”

    Perhaps not the most elegant or flexible, but it will do the job for now

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a nested unordered list that I would like to serialize
I have a nested list that looks like this: li = [['m', 'z', 'asdgwergerwhwre'],
I have a large nested list that I am trying to animate using jquery
I have a list of links that are using nested span elements as a
I have a grid that is currently using Telerik Grids, I would like to
I have created a nested list with drag/drop functionality. My issue is that I
I have a nested list like this: <ul class=list> <li class=list_item_type_1> <ul class=list> <li
I have a nested list something like this: PLACES = ( ('CA', 'Canada', (
I have a nested oredered list which i m animating using this code... var
How would I create a nested list, I currently have this public function getNav($cat,$subcat){

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.