字符串未更改为大写

问题描述

我想知道为什么我没有得到想要的输出? 我的代码-

import { persistStore } from 'redux-persist';
import createSagaMiddleware from 'redux-saga';

import createStore from './createStore';
import persistReducers from './persirstReducers';

import rootReducer from './modules/rootReducer';
import rootSaga from './modules/rootSaga';

const sagaMonitor = __DEV__ ? console.tron.createSagaMonitor() : null;

const sagaMiddleware = createSagaMiddleware({ sagaMonitor });

const middlewares = [sagaMiddleware];

const store = createStore(persistReducers(rootReducer),middlewares);
const persistor = persistStore(store);

sagaMiddleware.run(rootSaga);

export { store,persistor };

输出-

?????? = ['????','????????']
for i in ??????:
  print(i.upper())
print(??????)

所需的输出-

????
????????
['????','????????']

解决方法

您的单词是用数学大写字母字体写的,没有大写字母:

hex(ord(mylist[0][0]))
#'0x1d68f'
hex(ord('f'))
#'0x66' - this is the "normal f"
mylist[0][0] == 'f'
# False

因此,从技术上讲一切正常:i.upper()i转换为大写,但是由于没有大写字母,因此转换的结果是相同的字符串。