姓名 | 性别 | 学号 |
---|---|---|
张佳静 | 女 | 0194966 |
s='''2019骞村害鎶ュ憡鈥侫nnuAl report
IX. Non-Recurring Profit or Loss
鈭� Applicable Not applicable
Unit: RMB
2018 2017
Item 2019 Note
(Restated) (Restated)
For details, please refer to
Investment income from disposal of subsidiaries 848,211,045.94 807,518,533.61 鈥� Note 5(3)(a) of Chapter 12
Financial Report.
Gains on disposals of non-current assets (including
offsetting amount for the provision of impairment of 31,356,737.19 71,160,937.90 1,075,903,723.03
assets
It mainly represents
Government grants recognized in profit or loss for government subsidies
the current period (excluding government grants arising from fiscal
that are closely related to the Company鈥檚 business 545,508,216.82 295,443,847.50 230,922,102.34 appropriation,
operations, in accordance with national uniform transportation capacity
standards) subsidies and tax refund,
etc.
Net loss/profit arising from business combinations
involving enterprises under common control from the
-2,123,517.28 -43,047,655.76 3,495,095.51
beginning of reporting period to the combination
date
Gains or losses from changes in fair value of financial
assets and liabilities held for trading, derivative
financial assets and liabilities, and investment (losses)/ It mainly attributable to the
gains arising from the disposal of financial assets and gains arising from changes
364,072,933.26 -8,398,916.11 14,060,964.04
liabilities held for trading, derivative financial assets in fair value of other non-
and liabilities and other debt investments, excluding current financial assets.
hedging activities related to the normal business
operations of the Company
Income from external entrusted loans 鈥� 416,510.40 5,060,742.88
Net amount of other non-operating income and
-38,285,034.94 13,515,766.49 24,976,445.24
expenses
Less: Income tax effect 159,282,664.33 63,672,015.52 281,823,573.43
Profit or loss attributable to minority
716,085.28 620,414.11 1,048,197.18
shareholders (after tax)
Non-recurring profit or loss attributable to
1,588,741,631.38 1,072,316,594.40 1,071,547,302.43 鈥�
shareholders of the parent company
Provide explanations for classifying non-recurring profit and loss items defined in the Explanatory Announcement No. 1 for Public Company Information
Disclosures 鈥� Non-recurring Profits and Losses, and for classifying non-recurring profit and loss items listed in the Explanatory Announcement No. 1 for
Public Company Information Disclosures 鈥� Non-recurring Profits and Losses as recurring profit and loss items.
Applicable 鈭� Not applicable
The Company has not classified non-recurring profit and loss items defined or listed in the Explanatory Announcement No. 1 for Public Company
Information Disclosures 鈥� Non-recurring Profits and Losses in the reporting period.'''
def lengthOfLastWord(s):
l=s.split()
word=l[-1]
if len(word)==0:
return 0
return len(word[0:-1])
print(lengthOfLastWord(s))
存在的问题有:
根据如上代码进行修进,得到的新代码如下
import os
os.chdir('D:\金融数据')
f = open('作业一素材.txt',encoding='utf-8')
txt = f.read()
f.close()
print(txt)
def lengthOfLastWord(s):
index = s.find('\n顺丰控股股份有限公司')
#此处可更替为正则表达式
s_target =s[:index]
lines = s_target.split('\n')
s_line = lines[-1]
words = s_line.split(' ')
last_word = words[-1]
if len(last_word)==0:
return 0
return len(last_word[0:-1])
print(lengthOfLastWord(txt))
*除去页尾处可更替为正则表达式,根据年报编排规律探索普适性