How to get UID of mail in All Maill folder if I have UID of this mail in inbox using imaplib?
As you know the google store mails in the two instances in All Mail and in inbox I whant to move this to mail in trash folder using imaplib
You can do it using any of the 2 following ways.

You can use Message-Id field of the mail header.Message-Id field for both the mail 
    will be same.
Apply SEARCH  command on All Mail Folder.
   i.e search on title --> it will give you uid for that mail.
How to get UID of mail in All Maill folder if I have UID of this mail in inbox using imaplib? (GMail)