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

  • SEARCH
  • Home
  • 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 7867315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:40:47+00:00 2026-06-03T00:40:47+00:00

I am working on list using python input : [[u’Tempoh’, ”, ”, u’Belanjawan semasa’,

  • 0

I am working on list using python

input :

[[u'Tempoh', '', '', u'Belanjawan semasa', '', '', u'Perbelanjaan pembangunan', '', '', u'Lebihan / kurangan(-) keseluruhan', u'Sumber-sumber kewangan', '', '', '', '', '', ''], ['', '', '', u'Current budget', '', '', u'Development expenditure', '', '', '', u'Sources of finance', '', '', '', '', '', ''], ['', '', '', u'Hasil', u'Perbelanjaan1', u'Lebihan / kurangan(-)', u'Perbelanjaan pembangunan kasar', u'Tolak: Terimaan balik pinjaman', u'Perbelanjaan pembangunan bersih', '', u'Pinjaman dalam negeri', '', '', u'Pinjaman luar negeri', '', '', u'Penggunaan harta2'], ['', '', '', '', '', '', '', '', '', '', u'Domestic borrowing', '', '', u'Foreign borrowing', '', '', ''], [u'Period', '', '', '', '', '', '', '', '', '', u'Peminjaman kasar dalam negeri', u'Tolak: Pembayaran balik dalam negeri', u'Peminjaman bersih dalam negeri', u'Peminjaman kasar luar negeri', u'Tolak: Pembayaran balik luar negeri', u'Peminjaman bersih luar negeri', ''], ['', '', '', u'Revenue', u'Expenditure1', u'Surplus / deficit(-)', u'Gross development expenditure', u'Less: Loan recoveries', u'Net development expenditure', u'Overall surplus / deficit(-)', u'Gross domestic borrowing', u'Less: Domestic repayment', u'Net domestic borrowing', u'Gross foreign borrowing', u'Less: Foreign repayment', u'Net foreign borrowing', u'Use of assets']

output:

I want this empty space to be filled by previous string

thanks in advance

  • 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-06-03T00:40:50+00:00Added an answer on June 3, 2026 at 12:40 am

    You can use following idiom:

    new = [s2 or s1 for s1, s2 in zip (stringList, stringList[1:])] # + last element
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with python plugins.I used list to store some values as below:
I'm attempting to create a linked list of length n using Python. I have
Working in python 2.7. I have an argument that takes a list, adds the
working on creating an XML file with some data using Python. I am trying
Using Mongokit with Python. Having some trouble working out get the last n number
I've been working on a project using python with OpenGL for a while now.
I am using the python.el from fgallina python.el github There is a long list
I'm using Python's Tkinter to create a GUI for a project i'm working on.
I've been working in Python with an array which contains a one-dimensional list of
Working on a small web spider in python, using the lxml module I have

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.