Skip to content

Arin-Grigoras/CnPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CnPython

Implementing most of pythons builtin functions in C, making it easier to read.

Compile

Go to the makefile and adjust it to your needs.

How to contribute

Just create an issue if you have an idea for a builtin function or create a new pull request if you can also write the code for that. When I will have more time to spend on this project I will definetly contribute a little bit more.

Implemented functions

  • type(var),
  • bin(decimal),
  • hex(decimal),
  • oct(decimal),
  • pow(base, exponent),
  • str(number),
  • _int(string),
  • input(prompt),
  • reverse(arr, size),
  • min(arr, size),
  • max(arr, size),
  • print(*format, ...),
  • sorted(arr, size),
  • sum(arr, size),
  • str_len(str),
  • str_count(str, find),
  • endswith(str, element),
  • replace(str, find, repl),
  • find(str, find),
  • startswith(str, element),
  • str_split(arr, str, del),
  • printSplit(str, del),
  • split(arr, str, del)
  • chr(ascii)
  • ord(char)
  • isin(str, value)
  • rem(a, b)
  • percentage(p, n)
  • iappend(arr, value, size)
  • copy(arr, dest, size)
  • arr_count(arr, value, size)
  • arr_find(arr, value, size)
  • pop(arr, size)

License

This code is under a MIT license. This means you can do whatever you want with the code but the same license has to be in your project if you want to use this in your project.

About

Trying to implement python functions in C so it's easier to read.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •