Archive

Archive for the ‘Programación’ Category

KeyError: ‘\n\n’ when trying to format string in python

March 17, 2018 Leave a comment

I was getting the error this error:

KeyError: ‘\n\n’

when trying to do a str.format(*vals) in python

the issue was that the str, had some {} as part of the template, to fix this I just double the brackets {{}}

 

you can check a similar error here : https://stackoverflow.com/questions/32224197/get-consistent-key-error-n

Advertisements
Categories: Mini-tips, Python

Script to upload files to git with template generation in python3

February 3, 2018 Leave a comment

https://github.com/Grekz/helper-scripts/blob/master/github_python.py

Categories: Python, Windows

058. Length of Last Word #leetcode #java #python3 #javascript #ruby #golang #scala #easy

January 26, 2018 Leave a comment

053. Maximum Subarray #leetcode #java #python3 #javascript #ruby #golang #scala #easy

January 25, 2018 Leave a comment

032. Longest Valid Parentheses #leetcode #java #python3 #javascript #ruby #golang #scala #hard

January 23, 2018 Leave a comment

028. Implement strStr() #leetcode #java #python3 #javascript #ruby #golang #scala

January 19, 2018 Leave a comment

027. Remove Element #leetcode #java #python3 #javascript #ruby #golang #scala

January 18, 2018 Leave a comment