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 8034783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:07:32+00:00 2026-06-05T02:07:32+00:00

The beginning of question is here Custom sort python I want to make special

  • 0

The beginning of question is here Custom sort python

I want to make special sorting by this alphabet

alphabet = u'aáàAâÂbBcCçÇdDeéEfFgGğĞhHiİîÎíīıIjJkKlLmMnNóoOöÖpPqQrRsSşŞtTuUûúÛüÜvVwWxXyYzZ

[aáàAâÂ] this group of characters should have same priority. In earlier thread, @happydave suggested to use (alphabet.index(c)/2),

which should map each pair of adjacent characters in your list to the
same priority.

But in my case I don’t have pair of character? for example: aáàAâÂ, eéE, uUûúÛ, óoO, iİîÎíī.

In my opinion simple way is to add one item,containing only paired charachers to each list, but I don’t know how to implement it.

 [['word1', <Element tag at b719a4cc>], ['word2', <Element tag at b719a6cc>]]

list of list with one added item

[['word1_', 'word1', <Element tag at b719a4cc>], ['word2_', 'word2', <Element tag at b719a6cc>]]
  • 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-05T02:07:33+00:00Added an answer on June 5, 2026 at 2:07 am
    s='aáàAâÂbBcCçÇdDeéEfFgGğĞhHiİîÎíīıIjJkKlLmMnNóoOöÖpPqQrRsSşŞtTuUûúÛüÜvVwWxXyYzZ'
    s2='aaaaaabbccccddeeeffgggghhiiiiiiiijjkkllmmnnoooooppqqrrssssttuuuuuuuvvwwxxyyzz'
    trans = str.maketrans(s, s2)
    
    def unikey(seq):
        return seq[0].translate(trans)
    

    Use this function as key argument of sorted

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

Sidebar

Related Questions

Newbie question here. I'm in the beginning stages of laying out a site in
I sure hope this is an ok question to ask here. I realize it
I have a simple Java question here. I want to auto text scroll to
Drawing a blank with finalizing my deploy scheme here. After posting this question: Migrating
this is my first question here @stackoverflow. I'm writing a monitoring tool for some
First question here, so please forgive me if this seems obvious. I'm having a
this is my first time posting a question here - I've searched for ones
This question is a slight extension of the one answered here . I am
I found here many responses for my question but I cat't find exactly what
I have posted this question on the Ext-GWT forums, I am just hoping that

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.