Python Forum
Convert an Interger into any base !? [Solved]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert an Interger into any base !? [Solved]
#7
Can also use numpy.base_repr
>>> import numpy as np
>>> 
>>> n = 1984
>>> np.base_repr(n, base=27)
'2JD'
Skaperen likes this post
Reply


Messages In This Thread
RE: Convert an Interger into any base !? - by snippsat - Jan-10-2023, 08:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [SOLVED] Correct way to convert file from cp-1252 to utf-8? Winfried 8 11,386 Feb-29-2024, 12:30 AM
Last Post: Winfried
  is there any tool to convert negative base to int? Skaperen 7 3,872 May-27-2022, 07:30 AM
Last Post: Gribouillis
  Convert list to interger Clives 5 2,800 May-09-2022, 12:53 PM
Last Post: deanhystad
Thumbs Up Convert ActiveDirectory timestamp into regular one. Arrow (solved) SpongeB0B 2 2,963 Nov-02-2020, 08:34 AM
Last Post: bowlofred
  convert non-string with explicit base jacklee26 5 21,205 Nov-06-2018, 06:50 AM
Last Post: jacklee26

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020